import uuid

from Connector.client import res_success
from service.func.topology_get import topology_get


class CmdTopologyGet:
    name = "topology_get"
    id = uuid.uuid4()

    def __init__(self, service, Params, Tag, Type):
        self.service = service
        self.params = Params
        self.tag = Tag
        self.type = Type

    async def execute(self):
        await res_success(self.tag, self.type, {
            "topology": topology_get(self.service)
        })
